@using Akso.Localization
<div ng-controller="host.views.tenants.index as vm">
    <div class="row margin-bottom-5">
        <div class="col-xs-6">
            <div class="page-head">
                <div class="page-title">
                    <h1>
                        <span>@L("Tenants")</span> <small>@L("TenantsHeaderInfo")</small>
                    </h1>
                </div>
            </div>
        </div>
        <div class="col-xs-6 text-right">
            <button ng-if="vm.permissions.create" class="btn btn-primary blue" ng-click="vm.createTenant()"><i class="fa fa-plus"></i> @L("CreateNewTenant")</button>
        </div>
    </div>
    <div class="portlet light margin-bottom-0">
        <div class="portlet-title portlet-title-filter">
            <div class="inputs inputs-full-width">
                <div class="portlet-input">
                    <form>
                        <div class="input-group">
                            <input ng-model="vm.filterText" auto-focus class="form-control" placeholder="@L("SearchWithThreeDot")" type="text">
                            <span class="input-group-btn">
                                <button ng-click="vm.getTenants()" class="btn default" type="submit"><i class="icon-magnifier"></i></button>
                            </span>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="portlet-body">
            <div busy-if="vm.loading">
                <div ui-grid="vm.tenantGridOptions" ui-grid-pagination ui-grid-resize-columns dir=@(CultureHelper.IsRtl ? "rtl" : "")></div>
            </div>
        </div>
    </div>
</div>